package test4;

public class Credit extends Payment {
    private String number;
    private String type;
    private String expireDate;

    public Credit(double amount, String number, String type, String expireDate) {
        super(amount);
        this.number = number;
        this.type = type;
        this.expireDate = expireDate;
    }

    @Override
    public void processPayment() {
        System.out.println("Credit card payment processed.");
    }

    public String getPaymentDetails() {
        return "Credit Card: " + type + ", Card Number: " + number + ", Amount: $" + amount;
    }

}











